1. Technical Field
The present invention relates to tape drives in general, and in particular to a method and apparatus for evaluating performance on host data transfer in tape drives.
2. Description of Related Art
When a tape recording apparatus, such as a tape drive, has been used over a long period of time, a situation where a processing time for backup does not end within an expected time period may occur because of some reason or another. The overrun of backup time can be attributed to the degradation in performance on data transfer from a host. In order to prevent the overrun of backup time when the problem is at the drive side, the drive needs to report its problem to the host.
Referring now to the drawings and in particular to FIG. 1, there is depicted a block diagram of a data recording apparatus system. As shown, a tape drive 100 includes an interface 110, a buffer 120, a recording channel 130, a tape 14a, a head 14b, reels 14c and 14d, a cartridge 14e, a motor 150, a controller 160, a head position control system 170, and a motor driver 185. Interface 110 communicates with a host 105. Interface 110 receives, from host 105, a command for instructing writing of data to be transferred to buffer 120, and a command for instructing writing of data into buffer 120 and into tape 14a. Buffer 120 is a memory, such as a random access memory, for saving data to be written into tape 14a. 
Data delivered through recording channel 130 are formed in units of datasets (for example, 400 KB each), and are written into tape 14a by means of head 14b. Tape 14a is wound around reels 14c and 14d, and longitudinally moves along with rotations of the reels in a direction from reel 14c to reel 14d, or in an opposite direction. Cartridge 14e is a container for housing reel 14c around which tape 14a is wound. Motor 150 rotates reels 14c and 14d. 
Controller 160 controls tape drive 100. Controller 160 controls the writing/reading of data into/from tape 14a in accordance with a command received from host 105 through interface 110. Controller 160 also controls head position control system 170 and motor driver 185. When there is a need for head 14b to switch tracks, head position control system 170 electrically controls head 14b so that head 14b can switch tracks. In addition, controller 160 monitors data (write/read data) in interface 110, buffer 120 and recording channel 130. Motor driver 185 may be connected directly to controller 160.
With reference now to FIG. 2, there is illustrated a process flow after data have been received from host 105. In a Linear Tape Open (LTO) type tape drive, for example, after data have been received from a host, data compression is performed on the fly in interface 110. The host transfers the data at a maximum transfer rate H (e.g., 160 MB/sec). FIG. 2 shows data transfer of compressed data from buffer 120 to tape 14a at a drive transfer rate T (e.g., 35 MB/sec) by drive 100. Drive 100 performs a Write action while performing a Pause action for temporarily stopping transfer on the host side. During the Write action, the Pause occurs when a data transfer rate from host 105 to drive 100 is faster than a data transfer rate from drive 100 (buffer 120) to tape 14a. During a Read action, a Pause state occurs when a host transfer rate from buffer 120 to host 105 is faster than a drive transfer rate from tape 14a to drive 100 (buffer 120). Between host 105 and the drive, data with arbitrary lengths are written or read. Buffer 120 is sectioned into units of segments of one uniform size for temporarily storing read/write data. The Pause state occurs during the Write action means that there is no segment in buffer 120 into which subsequent data can be written, i.e., there is no free space in buffer 120. The Pause state occurs during the Read action means that, as data are slow in being read from tape 14a to buffer 120, the entire buffer is free space.
Even if data are transferred from host 105 at the rate of 160 MB/sec, when the writing speed (the drive transfer rate) from buffer 120 to tape 14a is 35 MB/sec, host performance is dictated by the drive transfer rate as the drive transfer rate is smaller than the host transfer rate. No matter how fast the host transfer rate is, the performance of the host transfer rate at 160 MB/s cannot be exerted unless the drive can perform writing at a rate of the host transfer rate or higher. Even though the host transfer rate is not exerted, if writing data into the tape is performed at a transfer rate close to, or at least, an ideal value of the drive transfer rate at 35 MB/s, the drive can sufficiently exert writing performance thereof. Suppose, when the host has transferred 2:1 compressible data at a rate of 70 MB/s or below, the data are compressed inside the drive, and therefore, the drive theoretically never keeps the host side from waiting to transfer. In other words, the transfer rate H between the host and the drive coincides with a transfer rate expected by the host. In a case when a time period during which the drive keeps the data transfer from the host waiting is close to a calculated value, the drive can be determined as sufficiently exerting the drive transfer rate. In this case, even though the host is kept waiting to transfer data to the drive, the degradation in performance is not recognized in the data transfer from the host.
A factor in the performance degradation of the data transfer between the host and the drive does not necessarily exist only in the drive and cartridge. Also, even if numerous errors have occurred in the tape, it does not necessarily lead to the performance degradation. There are various factors in such degradation of performance, and it is very difficult to specify a cause. With respect to a problem concerning the performance of the tape drive, sometimes the performance degradation was not at the drive side but at the user side.
In some cases, the writing of data into tape 14a from buffer 120 is kept waiting due to some sort of problems in the drive and tape. Thus, the transfer rate H of the host substantially becomes not more than that rate it should have. When numerous errors occur in the drive, it can be concluded that the drive itself has become a factor in the performance degradation of the data transfer from the host. Consequently, it would be desirable to provide a method and apparatus to report to the host any error status of the drive before the error become a permanent error (irrecoverable error) when the performance of the drive starts degrading.